﻿<%@ Page Title="" Language="C#" MasterPageFile="~/rightContent.Master" AutoEventWireup="true"
    CodeBehind="ContractView.aspx.cs" Inherits="WEB.contract.ContractView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" runat="server">
    合同管理
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <table width="100%">
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="center">
                搜索：<asp:DropDownList ID="ddlQuery" runat="server">
                    <asp:ListItem Value="CustomerName">客户名</asp:ListItem>
                    <asp:ListItem Value="CodeName">客户类型</asp:ListItem>
                    <asp:ListItem Value="ContractNO">合同号</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox ID="tbQuery" runat="server"></asp:TextBox>
                <asp:Button ID="btQuery" runat="server" Text="搜索" CssClass="Submit_yellow" OnClick="btQuery_Click" />
                <asp:DropDownList ID="ddlDate" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="ddlDate_SelectedIndexChanged">
                    <asp:ListItem>默认</asp:ListItem>
                    <asp:ListItem Value="1">最近一个月到期</asp:ListItem>
                    <asp:ListItem Value="2">到期合同</asp:ListItem>
                    <asp:ListItem Value="3">未到期合同</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="gvCon" runat="server" AutoGenerateColumns="False" CssClass="distance"
                    DataKeyNames="ID" OnRowCommand="gvCon_RowCommand" OnRowCreated="gvCon_RowCreated"
                    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
                    CellPadding="4" ForeColor="Black" GridLines="Vertical" AllowPaging="True" OnPageIndexChanging="gvCon_PageIndexChanging"
                    PageSize="20" Width="1050px">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:ButtonField ButtonType="Button" Text="下载" CommandName="dow">
                            <ControlStyle CssClass="Submit_gv" />
                            <ItemStyle Width="50px" />
                        </asp:ButtonField>
                        <asp:ButtonField ButtonType="Button" Text="添加" CommandName="add">
                            <ControlStyle CssClass="Submit_gv" />
                            <ItemStyle Width="50px" />
                        </asp:ButtonField>
                        <asp:BoundField DataField="CodeName" HeaderText="客户类型">
                            <ItemStyle Width="70px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CustomerName" HeaderText="客户名">
                            <ItemStyle Width="240px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="ContractNO" HeaderText="合同号">
                            <ItemStyle Width="60px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Datestart" HeaderText="开始日期" DataFormatString="{0:d}">
                            <ItemStyle Width="90px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Dateover" HeaderText="结束日期" DataFormatString="{0:d}">
                            <ItemStyle Width="90px" Font-Underline="True" />
                        </asp:BoundField>
                        <asp:BoundField DataField="inputdate" HeaderText="录入日期" DataFormatString="{0:d}">
                            <ItemStyle Width="90px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Remarks" HeaderText="说明">
                            <ItemStyle Width="200px" />
                        </asp:BoundField>
                        <asp:TemplateField ShowHeader="False" Visible="False">
                            <ItemTemplate>
                                <asp:Button ID="Button1" runat="server" CausesValidation="false" CommandName="" OnClientClick="return confirm('确认删除？')"
                                    CommandArgument='<%# Eval("ID") %>' Text="删除" OnClick="Button1_Click" />
                            </ItemTemplate>
                            <ControlStyle CssClass="Submit_gv" />
                            <ItemStyle Width="50px" />
                        </asp:TemplateField>
                        <asp:ButtonField ButtonType="Button" CommandName="more" Text="更多">
                            <ControlStyle CssClass="Submit_gv" />
                            <ItemStyle Width="50px" />
                        </asp:ButtonField>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
